<?php

	require("header.php");
	require("table_des_matieres.php");

if (isset($valider))
{
	
	echo " 	<fieldset class='alertfieldset'><legend>".$language[$_SESSION['lang']]["SureRefuse"]."</legend>
				".$language[$_SESSION['lang']]["SureRefuse"]."
				<form method='POST'>
					<input type='hidden' name='alert_id' value='".$_POST['alert_id']."' />
					<input type='hidden' name='type' value='".$_POST['type']."' />
					<input type='submit' name='validernon' value='".$language[$_SESSION['lang']]["Yes"]."'  />
					<input type='submit' value='".$language[$_SESSION['lang']]["No"]."' />
				</form>
			</fieldset>";
	
}
else if (isset($intermed))
{
	
	echo " 	<fieldset class='alertfieldset'>
				".$language[$_SESSION['lang']]["NowInt"]." ".$language[$_SESSION['lang']]["PleaseLoginAgain"]."
			</fieldset>";
	
}

foreach ($alerts as $alert)
{
	if ($alert->type == "loc")
	{
		echo "	<fieldset class='alertfieldset'>
					<legend>".$language[$_SESSION['lang']]["ReceivedInformations"]."</legend>
					".buttonDoNotDisplay($language,$alert)."
					
					<img src='".$_SESSION['lang'].".lang/alert.png' style='float:left; margin-top:-10px; margin-left:-10px;' />

					<p>
						".$language[$_SESSION['lang']]["TheOwner"]." ".$alert->pers_civilite." ".$alert->pers_nom." ".$alert->pers_prenom." ".$language[$_SESSION['lang']]["Of"]." ".$language[$_SESSION['lang']]["TheLocation"]." ".$alert->location_nom." ".$language[$_SESSION['lang']]["SentLocationContractToYou"].". <br />
					</p>
					<a href='pdf.php?id=".intval($alert->location_id)."'>".$language[$_SESSION['lang']]["GetItHere"]."</a><br /><br />
					
					".$language[$_SESSION['lang']]["ContractFake"]."<br />					
					
					<form method='POST'>
						<input type='hidden' name='alert_id' value='".intval($alert->location_id)."' />
						<input type='hidden' name='type' value='loc' />
						<input type='submit' name='ouiloc' value='".$language[$_SESSION['lang']]["Accept"]."' />
						<input type='submit' name='nonloc' value='".$language[$_SESSION['lang']]["Refuse"]."' />
					</form>
					
					".$language[$_SESSION['lang']]["AdvertisingContract"]."
					
				</fieldset>";
	}
	else if ($alert->type == "int")
	{
		echo "	<fieldset class='alertfieldset'>
					<legend>".$language[$_SESSION['lang']]["ReceivedInformations"]."</legend>
					".buttonDoNotDisplay($language,$alert)."
					
					<img src='".$_SESSION['lang'].".lang/alert.png' style='float:left; margin-top:-10px; margin-left:-10px;' />

					<p>
						".$language[$_SESSION['lang']]["TheOwner"]." ".$alert->pers_civilite." ".$alert->pers_nom." ".$alert->pers_prenom." ".$language[$_SESSION['lang']]["Of"]." ".$language[$_SESSION['lang']]["TheLocation"]." ".$alert->location_nom." ".$language[$_SESSION['lang']]["AskYouToBeInt"].".<br />
					</p>
					
					<form style='margin:0;' method='POST'>
						<input type='hidden' name='alert_id' value='".intval($alert->location_id)."' />
						<input type='hidden' name='type' value='int' />
						<input type='submit' name='ouiint' value='".$language[$_SESSION['lang']]["Accept"]."' />
						<input type='submit' name='nonint' value='".$language[$_SESSION['lang']]["Refuse"]."' />
					</form>
				</fieldset>";
	}
	else if ($alert->type == "Yloc")
	{
		echo "	<fieldset class='alertfieldset'>
					<legend>".$language[$_SESSION['lang']]["ReceivedInformations"]."</legend>
					".buttonDoNotDisplay($language,$alert)."
					
					<img src='".$_SESSION['lang'].".lang/alert.png' style='float:left; margin-top:-10px; margin-left:-10px;' />

					".$language[$_SESSION['lang']]["YoureEngaged"]." ".$alert->pers_civilite." ".$alert->pers_nom." ".$alert->pers_prenom." ".$language[$_SESSION['lang']]["Of"]." ".$language[$_SESSION['lang']]["TheLocation"]." ".$alert->location_nom.". <br />
					".$language[$_SESSION['lang']]["LocationBegin"]." ".$alert->date_debut." ".$language[$_SESSION['lang']]["For"]." ".$alert->duree." ".$language[$_SESSION['lang']]["Days"].".<br /><br />
					
					<a href='pdf.php?id=".intval($alert->location_id)."'>".$language[$_SESSION['lang']]["GetItHere"]."</a><br /><br />
					
					".$language[$_SESSION['lang']]["WantToDecline"]." <a href='mailto:abortLocation@locyourhome.com'>".$language[$_SESSION['lang']]["ThisAddress"]."</a>.<br />
					
				</fieldset>";
	}
	else if ($alert->type == "Nloc")
	{
		echo "	<fieldset class='alertfieldset'>
					<legend>".$language[$_SESSION['lang']]["ReceivedInformations"]."</legend>
					".buttonDoNotDisplay($language,$alert)."
					
					<img src='".$_SESSION['lang'].".lang/alert.png' style='float:left; margin-top:-10px; margin-left:-10px;' />

					".$alert->pers_civilite." ".$alert->pers_nom." ".$alert->pers_prenom." ".$language[$_SESSION['lang']]["RefusesYourDemand"]." ".$language[$_SESSION['lang']]["For"]." ".$language[$_SESSION['lang']]["TheLocation"]." ".$alert->location_nom.".</br>
					
				</fieldset>";		
	}

}

?>

<fieldset>
<legend><?php echo $language[$_SESSION['lang']]["ManageYourProfile"]; ?></legend>
<a href="editProfile.php"><?php echo $language[$_SESSION['lang']]["ManageYourProfile"]; ?></a><br />
</fieldset>

<fieldset>
<legend><?php echo $language[$_SESSION['lang']]["Locations"]; ?></legend>
<a href="historyClient.php"><?php echo $language[$_SESSION['lang']]["SeeYourHistory"]; ?></a>
</fieldset>

<?php

	require("footer.php");
	
?>
-
